﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Threading;

namespace Giraffe.Client.Common
{
    public class ApplicationProxy: IApplicationProxy
    {
        #region Implementation of IApplicationProxy

        public ResourceDictionary Resources
        {
            get
            {
                return Application.Current.Resources;
            }
        }

        public Dispatcher UIDispatcher
        {
            get
            {
                return Application.Current.Dispatcher;
            }
        }


        //public void Dispatch(Delegate method, params object[] args)
        //{
        //    if(!Application.Current.Dispatcher.CheckAccess())
        //    {
        //        Application.Current.Dispatcher.Invoke(method, args);
        //    }
        //    method.DynamicInvoke(args);
        //}


        #endregion
    }
}
